<h2>名人机构 &gt; 分类管理</h2>

<table class='property' cellpadding="0" cellspacing="0" >
<tr>
	<td width="10%">分类ID</td>
	<td width="30%">分类名称</td>
	<td width="20%">分类小名人机构人数</td>
	<td width="30%">操作</td>
</tr>
<?php foreach ((array) $this->ret as $k => $v):?>
<tr bgcolor="<?php if ($k % 2 == 0) echo '#E5E5E5';?>">
	<td><?=$v['id']?></td>
	<td><?=str_repeat(' │ ', $v['dep']) . '├─' . $v['cate_name']?></td>
	<td><?=$v['cate_nums']?></td>
	<td><a href="<?=AdminController::_makeURL('friends','star','update_cate', array('id' => $v['id']))?>">[编辑]</a></td>
</tr>
<?php endforeach;?>                                        
</table>

<br/>
<form action='' method="POST">
<table class='property' cellpadding="0" cellspacing="0">
	<tr>
		<td class='key'>父级分类</td>
		<td>
		<select name="cate[parent_id]">
			<option value="0"> 一级分类 </option>
			<?php foreach($this->ret as $key => $val):?>
				<!--<option value="<?=$val['id']?>" rel="<?=$val['dep']?>"><?=str_repeat(' │ ', $val['dep']) . '├─' . $val['cate_name']?></option>-->
				<?if ($val['dep'] == 0):?><option value="<?=$val['id']?>" <?if ($this->update['parent_id'] == $val['id']) echo 'selected';?>><?='├─' . $val['cate_name']?></option><?endif;?>
			<?php endforeach;?>
			</select>
		</td>
	</tr>
	<tr>
		<td class='key'>分类名称</td>
		<td><input type="text" name="cate[cate_name]" value="<?=$this->update['cate_name']?>"/></td>
	</tr>
	
</table>
<input type="submit" value=" 编辑分类 " />
</form>